﻿using System;

namespace Shuba.Model
{
    [Serializable]
    public class LoanInfo
    {
        public LoanInfo()
        {
        }

        public LoanInfo
        (
            Int32 CIF_NUMBER
            , string LOAN_NUMBER
            , string APP_REF_NO
            , Int16 PRODUCT_CODE
            , string LINE_NUMBER
            , DateTime OPEN_DATE
            , double DISBURSE_AMOUNT
            , string ENTRY_BY
            , DateTime ENTRY_DATE
            , string UPDATE_BY
            , DateTime UPDATE_DATE
        )
        {
            this.CIF_NUMBER = CIF_NUMBER;
            this.LOAN_NUMBER = LOAN_NUMBER;
            this.APP_REF_NO = APP_REF_NO;
            this.PRODUCT_CODE = PRODUCT_CODE;
            this.LINE_NUMBER = LINE_NUMBER;
            this.OPEN_DATE = OPEN_DATE;
            this.DISBURSE_AMOUNT = DISBURSE_AMOUNT;
            this.ENTRY_BY = ENTRY_BY;
            this.ENTRY_DATE = ENTRY_DATE;
            this.UPDATE_BY = UPDATE_BY;
            this.UPDATE_DATE = UPDATE_DATE;
        }

        public LoanInfo
        (
            Int32 CIF_NUMBER
            ,string LOAN_NUMBER
            ,string APP_REF_NO
            ,Int16 PRODUCT_CODE
            ,string LINE_NUMBER
            ,DateTime OPEN_DATE
            ,double DISBURSE_AMOUNT
            ,string ENTRY_BY
            ,DateTime ENTRY_DATE
            ,string UPDATE_BY
            ,DateTime UPDATE_DATE
            ,string ACT_TYPE
        )
        {
            this.CIF_NUMBER = CIF_NUMBER;
            this.LOAN_NUMBER = LOAN_NUMBER;
            this.APP_REF_NO = APP_REF_NO;
            this.PRODUCT_CODE = PRODUCT_CODE;
            this.LINE_NUMBER = LINE_NUMBER;
            this.OPEN_DATE = OPEN_DATE;
            this.DISBURSE_AMOUNT = DISBURSE_AMOUNT;
            this.ENTRY_BY = ENTRY_BY;
            this.ENTRY_DATE = ENTRY_DATE;
            this.UPDATE_BY = UPDATE_BY;
            this.UPDATE_DATE = UPDATE_DATE;
            this.ACT_TYPE = ACT_TYPE;
        }

        public Int32 CIF_NUMBER { get; set; }
        public string LOAN_NUMBER { get; set; }
        public string APP_REF_NO { get; set; }
        public Int16 PRODUCT_CODE { get; set; }
        public string LINE_NUMBER { get; set; }
        public DateTime OPEN_DATE { get; set; }
        public double DISBURSE_AMOUNT { get; set; }
        public string ENTRY_BY { get; set; }
        public DateTime ENTRY_DATE { get; set; }
        public string UPDATE_BY { get; set; }
        public DateTime UPDATE_DATE { get; set; }
        public string ACT_TYPE { get; set; }

        public override string ToString()
        {
            return
            CIF_NUMBER.ToString() + " - " +
            LOAN_NUMBER + " - " +
            APP_REF_NO + " - " +
            PRODUCT_CODE.ToString() + " - " +
            LINE_NUMBER + " - " +
            OPEN_DATE.ToString("yyyy MMM dd hh:mm:ss") + " - " +
            DISBURSE_AMOUNT.ToString() + " - " + 
            ENTRY_BY + " - " +
            ENTRY_DATE.ToString("yyyy MMM dd hh:mm:ss") + " - " +
            UPDATE_BY + " - " +
            UPDATE_DATE.ToString("yyyy MMM dd hh:mm:ss");
        }

        public string ToString4Audit()
        {
            return
            "CIF_NUMBER: " + CIF_NUMBER.ToString() +
            ", LOAN_NUMBER: " + LOAN_NUMBER +
            ", APP_REF_NO: " + APP_REF_NO +
            ", PRODUCT_CODE: " + PRODUCT_CODE.ToString() +
            ", LINE_NUMBER: " + LINE_NUMBER +
            ", OPEN_DATE: " + OPEN_DATE.ToString("yyyy MMM dd hh:mm:ss") +
            ", ENTRY_BY: " + ENTRY_BY +
            ", ENTRY_DATE: " + ENTRY_DATE.ToString("yyyy MMM dd hh:mm:ss") +
            ", UPDATE_BY: " + UPDATE_BY +
            ", UPDATE_DATE: " + UPDATE_DATE.ToString("yyyy MMM dd hh:mm:ss");
        }
    }
}
